﻿/*
 * 由SharpDevelop创建。
 * 用户： lucifer
 * 日期: 2011/3/17
 * 时间: 18:27
 * 
 * 要改变这种模板请点击 工具|选项|代码编写|编辑标准头文件
 */
using System;

namespace Yidu.Persister.Annotation
{
	 /// <summary>
    /// 绑定数据库表名
    /// </summary>
    [AttributeUsage(AttributeTargets.Class,AllowMultiple = false)]
    public class BindTableAttribute : Attribute
    {
        private string name;
        private string owner;

        /// <summary>
        /// 初始化对象
        /// </summary>
        /// <param name="name">数据库表名</param>
        public BindTableAttribute(string name)
        {
            this.name = name;
        }

        /// <summary>
        /// 初始化对象
        /// </summary>
        /// <param name="name">数据库表名</param>
        /// <param name="owner">表所属Schema</param>
        public BindTableAttribute(string name,string owner)
        {
            this.name = name;
            this.owner = owner;
        }


        /// <summary>
        /// 数据库表名
        /// </summary>
        public string Name
        {
            get
            {
                return name;
            }
        }

        /// <summary>
        /// 表所属Schema
        /// </summary>
        public string Owner
        {
            get
            {
                return owner;
            }
        }
    }
}
